An important aspect of most methods for compressing sequences of digital video images is motion analysis. In typical motion analysis, a target image in a sequence of images is divided into a plurality of blocks of pixels, such blocks may typically be 8.times.8 pixels in dimension. A target region comprising at least one pixel block is selected from the target image. The image preceding the target image is analyzed in order to locate a region of the preceding image which closely matches the target region of the target image. Block matching techniques based on mean-square-error or mean-absolute-error are typically used to locate the region of the preceding image which closely matches the target region of the target image. If no motion has occurred, the preceding and target regions will have the same coordinates within the image frame. If motion has occurred, the preceding region will be offset or translated relative to the target region by an amount which is represented by a displacement vector. This process is typically repeated for each target region in the target image, thereby yielding a displacement vector for each target region. These displacement vectors are thereafter applied to a previous reconstructed image to form a predicted image. An error image is formed from the difference between the target image and the predicted image. The displacement vectors and the error image are then encoded for subsequent use by a decoder in decoding the compressed digital video signal. A known motion compensation system is described in U.S. Pat. No. 5,134,478 to Golin, entitled "Method And Apparatus For Compressing And Decompressing A Digital Video Signal Using Predicted And Error Images", the contents of which is hereby incorporated herein by reference.
Since each target image may typically be broken up into approximately 1K blocks (8.times.8), it can take a substantial number of bits to separately encode a displacement vector for each block. It was found that if some or all of the displacement vectors could be made the same (or merged) without unduly increasing the bits needed to encode the error image, the result would be more efficient encoding.
When adjacent blocks having different displacement vectors are decoded, a discontinuity will typically appear at the boundary between the blocks when the predicted image is formed. Besides being unattractive visually, such discontinuities normally result in an error image which is expensive to encode, because the error image contains high frequency errors. Within limits, it was found that a superior visual result could be achieved by encoding an adjacent block with an incorrect displacement vector, if a discontinuity between blocks could be avoided. Avoiding such discontinuities has the added benefit of reducing high frequency errors which are expensive to encode.
It is an object of the present invention to provide a system for merging displacement vectors that provides for encoded images with fewer bits while yielding decoded images having an improved visual appearance.
Further objects and advantages of the invention will become apparent from the description of the invention which follows.